
set( RENDERER_SOURCES
	cmdbuf.cpp		cmdbuf.h
				context.h
				context_common.h
	context_wgl.cpp		context_wgl.h
	vertex_layout.cpp	vertex_layout.h
)

set( RENDERER_LIBS renderer ${OPENGL_LIBRARY} )

if( GLEW_SOURCE )
	message( STATUS "Found GLEW source code. Linking statically" )
	list( APPEND RENDERER_SOURCES ${GLEW_SOURCE} )
	add_definitions( -DGLEW_STATIC )
else()
	list( APPEND RENDERER_LIBS ${GLEW_LIBRARY} )
endif()

add_library( renderer STATIC ${RENDERER_SOURCES} )
target_link_libraries( ${RENDERER_LIBS} )